// JavaScript Document
/* login.hmtl中的用户输入信息为空验证*/
function loginValidation()
{
	if(document.loginform.username.value == "") 
	{      
		alert("登录用户名不能为空");      
		document.loginform.username.focus();     
		return false;  
	}
	else if(document.loginform.pwd.value == "")
	{
		alert("登录密码不能为空");      
		document.loginform.pwd.focus();     
		return false;
	}
	else if(document.loginform.varify.value == "")
	{
		alert("登录验证码不能为空");      
		document.loginform.varify.focus();     
		return false;
	}
	else
	{
		return true;
	}
}

/*edituser.html中的用户输入信息为空验证*/
function editUserValidation()
{
	if(document.edituserform.userid.value == "") 
	{      
		alert("登录用户名不能为空");      
		document.edituserform.userid.focus();     
		return false;  
	}
	else if(document.edituserform.nickname.value == "")
	{
		alert("用户博客昵称不能为空");      
		document.edituserform.nickname.focus();     
		return false;
	}
	else if(document.edituserform.pwd.value == "")
	{
		alert("登录密码不能为空");      
		document.edituserform.pwd.focus();     
		return false;
	}
	else if(document.edituserform.pwdconfirm.value == "")
	{
		alert("再次确认登录密码不能为空");      
		document.edituserform.pwdconfirm.focus();     
		return false;
	}
	else if(document.edituserform.pwdconfirm.value != document.edituserform.pwd.value)
	{
		alert("登录密码与确认密码不一致");      
		document.edituserform.pwdconfirm.focus();     
		return false;
	}
	else
	{
		return true;
	}
}